#ifndef RP2MAIN_H
#define RP2MAIN_H

#include "Rp2System.h"
#include "Rp2InitializeMCR.h"
#include "Rp2Catalog.h"

namespace Rp2
{

class Image;
class Texture;
class VertexProgram;
class PixelProgram;

class Main
{

public:
	Main();
	~Main();

	// Initializer
	typedef void (*Initializer)(void);
	typedef std::vector<Initializer> InitializerArray; 
	static void AddInitializer(Initializer oInitializer);
	static void Initialize();

    typedef void (*Terminator)(void);
    typedef std::vector<Terminator> TerminatorArray;
    static void AddTerminator (Terminator oTerminate);
    static void Terminate ();

private:
	static InitializerArray* ms_pkInitializers;
    static TerminatorArray* ms_pkTerminators;

	// Resource
    static Catalog<Image>* ms_pkImageCatalog;
    static Catalog<Texture>* ms_pkTextureCatalog;
    static Catalog<VertexProgram>* ms_pkVertexProgramCatalog;
    static Catalog<PixelProgram>* ms_pkPixelProgramCatalog;
};

}

#endif